<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

    <div id="page-title">
        <h3>
            活动管理
        </h3>

        <div id="breadcrumb-right">
            <div class="float-right">
                <a href="/saleActivity/add" class="btn medium primary-bg">
                    <span class="button-content">
                    <i class="glyph-icon icon-cog float-left"></i>
                    添加
                    </span>
                </a>
            </div>
        </div>
    </div>

    <div id="page-content">
        <table class="table" id="exp">
            <thead>
                <tr>
                    <th>活动名称</th>
                    <th>开始日期</th>
                    <th>结束日期</th>
                    <th>活动状态</th>
                    <th>结束状态</th>
                    <th>是否上线</th>
                    <th>活动地址</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <#list pagerHelper.pager.list as saleactivity>
                <tr id="${saleactivity.id}" >
                    <td>${saleactivity.name}</td>
                    <td>${(saleactivity.startTime?string('yyyy-MM-dd HH:mm'))!'-'}</td>
                    <td>${(saleactivity.endTime?string('yyyy-MM-dd HH:mm'))!'-'}</td>
                    <td>${saleactivity.tagText}</td>
                    <td>${saleactivity.finish}</td>
                    <td>${saleactivity.statusText}</td>
                    <td style="width:180px;font-size:12px;">
                        <div style="width:180px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    -o-text-overflow:ellipsis;
    -icab-text-overflow: ellipsis;
    -khtml-text-overflow: ellipsis;
    -moz-text-overflow: ellipsis;
    -webkit-text-overflow: ellipsis;">
                            ${saleactivity.url}
                        </div>
                    </td>
                    <td>
                       <div class="dropdown">
                            <a href="javascript:;" title="" class="btn medium bg-blue" data-toggle="dropdown">
                                <span class="button-content">
                                    <i class="glyph-icon font-size-11 icon-cog"></i>
                                    <i class="glyph-icon font-size-11 icon-chevron-down"></i>
                                </span>
                            </a>
                            <ul class="dropdown-menu float-right">
                                <li><a href="/saleActivity/update/${saleactivity.id}" title=""><i class="glyph-icon icon-edit mrg5R"></i>修改</a></li>

                                <li><a href="/saleActivity/up/${saleactivity.id}" class="pub" title=""><i class="glyph-icon icon-calendar mrg5R"></i>上线</a></li>

                                <li><a href="/saleActivity/down/${saleactivity.id}" class="dow" title=""><i class="glyph-icon icon-calendar mrg5R"></i>下线</a></li>

                                <li class="divider"></li>
                                <li><a href="/saleActivity/delete/${saleactivity.id}" class="font-red del" title=""><i class="glyph-icon icon-remove mrg5R"></i>删除</a> </li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </#list>
            </tbody>
        </table>
    </div>
</div>

<script language="JavaScript">
    $(function(){
    <#if msg!=null>
        $.jGrowl("${msg}", {sticky:!1,position:'bottom-right',theme:'bg-green'});
    </#if>
    })
</script>